import request from "../utils/request";

export function uploadFile(data) {
    return request.post('/file/uploadFile', data, {
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    });
}

export function getFileList() {
    return request.get('/file/getFileList');
}

export function downloadFile(fileId) {
    return request.get(`/file/download/${fileId}`, {
        responseType: 'blob'
    })
}

export function deleteFile(fileId) {
    return request.delete(`/file/${fileId}`)
}

export function getThreeFiles(){
    return request.get(`/file/getThreeFiles`);
}